Who am I?
Who are you?
What brought you here?
We will be working on answering these questions during the first class collaboratory from 5:00-6:15 on Wednesday
Instructor
Description & Objectives
Class format
Class Readings
Evaluation & Grading
Topics
Communication
Karl Benedict
Director, Earth Data Analysis Center
Research Asst. Professor. University Libraries, Geography Dept.
kbene@edac.unm.edu
Office: Bandelier West, rm. 107
(505) 277-3622 x234
The basic concepts behind web mapping technologies that enable the delivery of maps and mapped data through web browsers
The Open Standards that facilitate the exchange of map images and geospatial data over the internet
The use of published standards-based services in desktop mapping applications that implement those standards
The deployment of standards-based geospatial map and data services that other systems and users may make use of
Online Lecture & in-person collaboratory in each class week
Focus on hands-on experience with standards, technologies, and capabilities
Exploratory and problem-based
Cumulative
HTML Manual of Style: A Clear, Concise Reference for Hypertext Markup Language (including HTML5), Fourth Edition (4th Edition). Larry Aronson. Addison-Wesley Professional. 2010.
Beginning Google Maps API 3. Gabriel Svennerberg. Apress. 2010.
OpenLayers 2.10 Beginner's Guide. Erik Hazzard. Packt Publishing. 2011.
Designing with Web Standards (3rd Edition). Jeffrey Zeldman & Ethan Marcotte. New Riders Press. 2009.
Class Grade =
Weekly Web Portfolio Milestones (including peer review when required)
"Deep Dive" Assignments
Exams
13 Weekly Portfolio Milestones - 40 points at mid-term review, 40 points at final review
4 "Deep Dive" Assignments
25 points/assignment (100 pts total)
Focussed on small project
Reinforcing lab activities
Added to your portfolio and added to your portfolio score
2 Exams
100 Points each
Midterm Exam - Take Home - due 3/12
Final Exam - Take Home - due 5/14
Focus on concepts and technical implementation
Internet Mapping Clients: Basic HTML, Javascript, CSS; Google Maps API; OpenLayers javascript library
Geospatial Services Oriented Architectures (SOA)
Open Standards: Open Geospatial Consortium (OGC - WMS, WFS, WCS, KML); Extensible Markup Language (XML)
Desktop client use of Open Standards
Data sharing/publication using Open Standards
What is Internet Mapping?
Definitions
Tools
Use of open standards based remote data and map services in desktop applications
Establishing open standards based services to share geospatial data and mapping capabilities over the Internet
The delivery of mapping and geospatial data tools through web browsers, again based upon open standards
The global computer network of computers that typically connect with each other over TCP/IP
The subset of applications that are run over the Internet, typically using the HTTP protocol in combination with data (HTML, XML, XHTML), presentation (CSS), and behavior (JavaScript) components
The generation of cartographic products that include map images (pictures of geospatial data) and other elements (e.g. legends, tools, scale information, north-arrow)
The development of models (statistical and otherwise) that enable the exploration of geospatial data and testing of hypotheses using those data
While the definition varies from one organization to the next, Open Standards are often characterized by the following:
Ability of systems to share data and information with each other
Commercial Off-the-Shelf Software. Applications that are “purchased” from vendors, often with license terms that restrict the use the software to the specific platform for which it is licensed. Often comes with implicit or explicit technical support
Software licensed under terms that are consistent with the Open Source definition, which includes access to source code, and freedom to modify and redistribute
Actual values associated with geographic locations. For example - numeric elevation values associated with locations within a Digital Elevation Model.
Data about a particular data product or service. Metadata provide critical documentation that supports the discovery and use of data products and data and mapping services
Linux server with GeoServer, Apache, GDAL and Proj libraries
Microsoft Windows Vista or 7
Mac OS 10.6 or above
Linux (speak to Dr. Benedict)
Quantum GIS (platform specific download)
ArcGIS 10 (optional - request free student version installation CD from Dr. Benedict - Windows Only)
FWTools (Windows & Linux - free download)
GDAL and related frameworks (Mac - the current "GDAL Complete" convenience package available here)
Notepad (Windows - included with operating system)
Notapad++ (Windows - free download)
TextEdit (Mac - included with operating system)
TextWrangler (Mac - free download)
WinSCP (Windows - free download)
Fugu (Mac - free download)
PuTTY (Windows - free download)
Terminal (Mac - included with operating system)
Firefox (All Operating Systems - free download)
Chrome (All Operating Systems - free download)
This is the first iteration with the class as a hybrid course, so the most productive communication model will evolve over the semester, but I commit to the following:
I will respond to email questions within ~24 hours
I will share responses to common questions with the rest of the class through the online discussion board
I also strongly encourage that questions be submitted through the discussion board so that other students can both learn from and contribute to the answers provided.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Content is defined in terms of the structural elements available in HTML/XHTML
<p>...</p> tags<h1>...</h1>, <h2>...</h2>, <h3>...</h3>, etc.<table>...</table> tags<ol>...</ol> or <ul>...</ul> tags, depending upon whether the list is ordered (numbered) or unordered (e.g. bulleted)<form>...</form> tags<div>...</div> tagsModifications to default rendering of HTML/XHTML elements are made through styles defined in CSS
<head> block (the preferred method when doing “real” web development)<head> block of a web pageh1 {color:red; font-size:18px;}Selectors may be based on several criteria
h1, p, table, ul, etc.
<h1>A top level heading</h1>h1 {color:red; font-size:18px}<p id=”para01”>Some text goes here</p>#para01 {color:blue; font-size:12px}<p class=”instructions”>Here are some instructions</p><p class=”instructions”>Here are some more instructions</p>.instructions {color:red; font-size:12px; text-decoration:blink}The most interoperable language for adding dynamic behavior to web sites is Javascript - supported by most browsers on most operating systems
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
NAWRS Mapper. HTML: 39 Lines; CSS: 136 Lines; core.js: 515 Lines + Google Maps API and JQuery Framework
What is an API
An Application Programming Interface (API) is a particular set of rules and specifications that a software program can follow to access and make use of the services and resources provided by another particular software program that implements that API. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers. -- From Wikipedia: http://en.wikipedia.org/wiki/Api
http://code.google.com/apis/maps/documentation/javascript/basics.html
http://code.google.com/apis/maps/documentation/javascript/tutorial.html
ROADMAP
SATELLITE
HYBRID
TERRAIN
specification of where the map should initially be centered
0=global, higher values increasingly local. Limited by map type
Overlay Types documentation
points depicted by specified or defined icons at locations within the map
linear features defined by multiple points with a defined style for the line
closed features defined by multiple points. Supports multi-polygons, and donuts. Line and fill styles may be specified.
Image-based map layers that replace or overlay Google layers - registered to the map coordinates
floating content windows for displaying content defined as HTML, a DOM element, or text string
Grouped display content assigned to a specific layer: KmlLayer, FusionTablesLayer, TrafficLayer, BicyclingLayer
definition of programmatically controlled layers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps01.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps02.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps03.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps04.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps05.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps06.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps07.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps08.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps09.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps10.html
Styled Maps Documentation | Styled Maps Wizard
Google Maps Styled Maps Wizard link
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/gmaps_styled.html
Some particularly relevant sections: Introduction (0:00 - 10:30) | Google Maps API Integration (21:40 - 34:42) | Summary and Links (52:00 52:40)
Fusion Tables Documentation/Help
Google Fusion Tables Introduction Video link
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
http://karlbenedict.com/GEOG485-585/lectures/examples/tnt/index.html
Capabilities
OpenLayers = Javascript (by example)
Application Programming Interface (API) Reference
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |
moveTo function: two controls movedMore detailed Map Object Options
More detailed Layer Object Options
Additional Map Layer Types - With Examples
Map Object Options API Reference
Two methods for constructing a new OpenLayers.Map object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Excerpts from the API documentation
allOverlays{Boolean} Allow the map to function with “overlays” only. Defaults to false. If true, the lowest layer in the draw order will act as the base layer. In addition, if set to true, all layers will have isBaseLayer set to false when they are added to the map.
div{DOMElement|String} The element that contains the map (or an id for that element). If the OpenLayers.Map constructor is called with two arguments, this should be provided as the first argument. Alternatively, the map constructor can be called with the options object as the only argument. In this case (one argument), a div property may or may not be provided. If the div property is not provided, the map can be rendered to a container later using the render method.
layers{Array(OpenLayers.Layer)} Ordered list of layers in the map
tileSize{OpenLayers.Size} Set in the map options to override the default tile size for this map.
projection{String} Set in the map options to override the default projection string this map - also set maxExtent, maxResolution, and units if appropriate. Default is "EPSG:4326".
units{String} The map units. Defaults to 'degrees'. Possible values are 'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
resolutions{Array(Float)} A list of map resolutions (map units per pixel) in descending order. If this is not set in the layer constructor, it will be set based on other resolution related properties (maxExtent, maxResolution, maxScale, etc.).
maxResolution{Float} Default max is 360 deg / 256 px, which corresponds to zoom level 0 on gmaps. Specify a different value in the map options if you are not using a geographic projection and displaying the whole world.
minResolution{Float}
maxScale{Float}
minScale{Float}
maxExtent{OpenLayers.Bounds} The maximum extent for the map. Defaults to the whole world in decimal degrees (-180, -90, 180, 90). Specify a different extent in the map options if you are not using a geographic projection and displaying the whole world.
minExtent{OpenLayers.Bounds}
restrictedExtent{OpenLayers.Bounds} Limit map navigation to this extent where possible. If a non-null restrictedExtent is set, panning will be restricted to the given bounds. In addition, zooming to a resolution that displays more than the restricted extent will center the map on the restricted extent. If you wish to limit the zoom level or resolution, use maxResolution.
numZoomLevels{Integer} Number of zoom levels for the map. Defaults to 16. Set a different value in the map options if needed.
Layer Object Options API Reference
Common Pattern of Layer Object Creation (varies some depending upon the specific layer type)
1 2 3 4 5 6 | |
id{String}
name{String}
isBaseLayer{Boolean} Whether or not the layer is a base layer. This should be set individually by all subclasses. Default is false
displayInLayerSwitcher{Boolean} Display the layer’s name in the layer switcher. Default is true.
visibility{Boolean} The layer should be displayed in the map. Default is true.
attribution{String} Attribution string, displayed when an OpenLayers.Control.Attribution has been added to the map.
projection{OpenLayers.Projection} or {String} Set in the layer options to override the default projection string this layer - also set maxExtent, maxResolution, and units if appropriate. Can be either a string or an OpenLayers.Projection object when created -- will be converted to an object when setMap is called if a string is passed.
units{String} The layer map units. Defaults to 'degrees'. Possible values are 'degrees'’ (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
scales{Array} An array of map scales in descending order. The values in the array correspond to the map scale denominator. Note that these values only make sense if the display (monitor) resolution of the client is correctly guessed by whomever is configuring the application. In addition, the units property must also be set. Use resolutions instead wherever possible.
resolutions{Array} A list of map resolutions (map units per pixel) in descending order. If this is not set in the layer constructor, it will be set based on other resolution related properties (maxExtent, maxResolution, maxScale, etc.).
maxExtent{OpenLayers.Bounds} The center of these bounds will not stray outside of the viewport extent during panning. In addition, if displayOutsideMaxExtent is set to false, data will not be requested that falls completely outside of these bounds.
minExtent{OpenLayers.Bounds}
maxResolution{Float} Default max is 360 deg / 256 px, which corresponds to zoom level 0 on gmaps. Specify a different value in the layer options if you are not using a geographic projection and displaying the whole world.
minResolution{Float}
numZoomLevels{Integer}
minScale{Float}
maxScale{Float}
displayOutsideMaxExtent{Boolean} Request map tiles that are completely outside of the max extent for this layer. Defaults to false.
transitionEffect{String} The transition effect to use when the map is panned or zoomed.
null No transition effect (the default).
resize Existing tiles are resized on zoom to provide a visual effect of the zoom having taken place immediately. As the new tiles become available, they are drawn over top of the resized tiles.
Both Map and Layer Objects have a number of associated functions as well
Get functions.Set functionsSome key issues to be aware of when using the WMS Layer Class:
Sample WMS Layer Object Creation
1 2 3 4 5 6 7 | |
Vector layers support
Vector Layer Objects are Typically Defined using three OpenLayers classes
ProtocolConnection protocol for requesting the data that would be provided from an external source
FormatThe OpenLayers supported format of the vector data object
StrategyA specification of how OpenLayers should request the data from the server, and also handle the data within the client (browser).
Sample Point Feature Object creation
1 2 3 | |
Sample KML Layer Object creation
1 2 3 4 5 6 7 8 9 10 11 | |
Example # Module 3 - GIS and Services Oriented Architectures #
For example, a census vector data product might include the geometries that define census tracts and attributes associated with each geometry: population, income, etc.
Raster data are frequently used to represent values for phenomena that vary continuously across space (e.g. elevation, concentration of air pollutants, depth to ground water, etc. )
These values are encoded over a regular grid of observation locations with a specified grid spacing - often referred to as the spatial resolution of the dataset (i.e. 10m resolution for a standard USGS Digital Elevation Model product)
Often parts of data collections that are repeated (i.e. remote sensing data products)
vector data access and information
raster data access and information
These libraries are the data access and processing foundation for a growing number of open source and commercial mapping systems
Information and documentation: GDAL Home Page | OGR Home Page
A catalog of numeric codes and associated coordinate transformation parameters is maintained by the International Association of Oil & Gas Producers (OGP) - the successor scientific organization to the European Petroleum Survey Group (EPSG)
These numeric codes are used by many desktop and online mapping systems to document and represent the coordinate systems of available data and services
Links to an online version of the registry and downloadable databases of the registry are available from: http://www.epsg.org/Geodetic.html.
The parameters that define a map projection may be looked up in a number of online locations:
When the projection parameters are in hand, the Proj4 library (http://trac.osgeo.org/proj/) and related utilities (cs2cs and proj) can be used to perform coordinate transformation calculations. cs2cs is my recommended utility for coordinate conversion because of the explicit definition of both source and destination coordinate reference system.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
The current networking computing model consists of Components Interacting with Each Other
What are components?
What does it mean to interact?
Database systems
File-based data
May be “chained” together to create a processing “workflow”. Output from one processing service may be used as the input to another
http://gstore.unm.edu/apps/rgis/datasets/b030ab7b-86e3-4c30-91c0-f427303d5c77/services/ogc/wms?
VERSION=1.1.1&&
SERVICE=WMS&
REQUEST=GetMap&
SRS=EPSG:4326&
FORMAT=image/jpeg&
STYLES=&
LAYERS=bernalillo_tm2011&
TRANSPARENT=TRUE&
WIDTH=521&
HEIGHT=200&
bbox=-107.207,34.8404,-106.143,35.2487
GetCapabilitiesGetMapGetFeatureInfoGetCapabilitiesDescribeFeatureTypeGetFeature/GetFeatureWithLockGetGmlObjectLockFeatureTransactionGetCapabilitiesDescribeCoverageGetCoverageImplementation information based upon OGC Implementation Statistics - Accessed 2/2014
Implementation information based upon OGC Implementation Statistics - Accessed 2/2014
The OGC web service specifications support key geospatial data access requirements
visualization of geospatial data through simple web requests
delivery of geospatial data (typically points, lines, and polygons) in a format that is usable in GIS and other applications
delivery of geospatial data (typically, but not limited to, raster data) usable in other applications
The OGC data and representation standards support data exchange and higher level representation
XML schema for the representation of features and associated attributes. It may be extended for use by specific communities of users (i.e. ecological data models)
XML schema that supports the combination of embedded data and external data into a complete representation model that may be used by client applications to present the data through a user interface (e.g. Google Earth, WorldWind)
From XML 1.0 (5th ed.) Recommendation
1 2 3 4 5 6 7 8 | |
XML Source (modified from original): w3schools
1 2 | |
Includes XML Declaration and Comment
3 4 5 6 7 8 | |
Define blocks of content
3 4 5 6 7 8 | |
4 5 6 7 | |
<br />7 | |
Define additional information about elements as name=value pairs.
7 | |
The material contained between the opening and closing tags of an Element.
1 2 3 4 5 6 7 8 | |
Why is this XML well-formed but not valid?
There is no DTD or Schema defined for the document against which it can be validated
<!DOCTYPE greeting SYSTEM "hello.dtd">
<![CDATA[<greeting>Hello, world!</greeting>]]>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
an XML document, with a “.kml” extension that is directly readable and editable
a compressed (zipped) file with a “.kmz” extension, that contains at least a KML document, but may contain other files as well
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Example from: KML 2.2 Specification (fig. 6)
including documents, folders, placemarks, network links
including points, linestrings, polygons, models, locations
including ground overlays, lat-lon boxes, photo overlays, screen overlays
styles, substyles, icons, label styles
read, update, create, delete, change
camera, look at
time span, timestamp
New Mexico State Boundary KML File | KMZ File (from NM RGIS)
OGC KML Implementation specification
GetCapabilities) - an XML file representing information about a specific WMS service and its component layersGetMap) - graphic files representing one or more layers from a single WMS service for a specified area of interest, and, optionally, for a specified point in timeGetFeatureInfo) - a basic representation (in a variety of formats) of the attributes associated with a specific pixel location in a map image| Request Parameter | 1.0 | 1.1 | 1.1.1 | 1.3.0 | Description |
|---|---|---|---|---|---|
| WMTVER=1.0.0 | R | Request version | |||
| VERSION=version | O | O | O | Request version | |
| SERVICE=WMS | R | R | R | R | Service type |
| REQUEST=capabilities | R | Request name | |||
| REQUEST=GetCapabilities | R | R | R | Request name | |
| UPDATESEQUENCE=string | O | O | O | Sequence number or string for cache control | |
| Vendor-specific parameters | O | Vendor-specific parameters |
R=Required / O=Optional
| Request Parameter | 1.0 | 1.1 | 1.1.1 | 1.3.0 | Description |
|---|---|---|---|---|---|
| WMTVER=1.0.0 | R | Request version | |||
| VERSION=version | R | R | R | Request version. | |
| REQUEST=map | R | Request name. | |||
| REQUEST=GetMap | R | R | R | Request name. | |
| LAYERS=layer_list | R | R | R | R | Comma-separated list of one or more map |
| layers. Optional (ver. 1.1, 1.1.1) if SLD | |||||
| parameter is present. | |||||
| STYLES=style_list | R | R | R | R | Comma-separated list of one rendering style |
| per requested layer. Optional if SLD | |||||
| parameter is present. | |||||
| SRS=namespace:identifier | R | R | R | Spatial Reference System. | |
| CRS=namespace:identifier | R | Spatial Reference System. | |||
| BBOX=minx,miny,maxx,maxy | R | R | R | R | Bounding box corners (lower left, upper right) |
| in SRS units. | |||||
| WIDTH=output_width | R | R | R | R | Width in pixels of map picture. |
| Request Parameter | 1.0 | 1.1 | 1.1.1 | 1.3.0 | Description |
|---|---|---|---|---|---|
| HEIGHT=output_height | R | R | R | R | Height in pixels of map picture. |
| FORMAT=output_format | R | R | R | R | Output format of map. |
| TRANSPARENT=TRUE or FALSE | O | O | O | O | Background transparency of map (default=FALSE). |
| BGCOLOR=color_value | O | O | O | O | Hexadecimal red-green-blue color value for the |
| background color (default=0xFFFFFF). | |||||
| EXCEPTIONS=exception_format | O | O | O | O | The format in which exceptions are to be reported |
| by the WMS (default=XML). | |||||
| TIME=time | O | O | O | Time value of layer desired. | |
| ELEVATION=elevation | O | O | O | Elevation of layer desired. | |
| Other sample dimensions | O | O | O | Values of other dimensions as appropriate. | |
| Vendor specific parameters | O | O | O | O | Vendor specific parameters |
| Request Parameter | 1.0 | 1.1 | 1.1.1 | 1.3.0 | Description |
|---|---|---|---|---|---|
| WMTVER=1.0.0 | R | Request version. | |||
| VERSION=version | R | R | R | Request version. | |
| REQUEST=feature_info | R | Request name. | |||
| REQUEST=GetFeatureInfo | R | R | R | Request name. | |
<map_request_copy> |
R | R | R | R | Partial copy of the Map request parameters that |
| generated the map for which information is desired | |||||
| QUERY_LAYERS=layer_list | R | R | R | R | Comma-separated list of one or more layers |
| to be queried. | |||||
| INFO_FORMAT=output_format | O | O | O | R | Return format of feature information (MIME type). |
| FEATURE_COUNT=number | O | O | O | O | Number of features about which to return |
| information (default=1). |
| Request Parameter | 1.0 | 1.1 | 1.1.1 | 1.3.0 | Description |
|---|---|---|---|---|---|
| X=pixel_column | R | R | R | X coordinate in pixels of feature | |
| (measured from upper left corner=0) | |||||
| I=pixel_column | R | i coordinate in pixels of feature in Map CS | |||
| Y=pixel_row | R | R | R | Y coordinate in pixels of feature | |
| (measured from upper left corner=0) | |||||
| J=pixel_row | R | j coordinate in pixels of feature in Map CS | |||
| EXCEPTIONS=exception_format | O | O | O | The format in which exceptions are to be | |
| reported by the WMS (default=XML). | |||||
| Vendor-specific parameters | O | O | O | Optional experimental parameters. |
1 2 3 4 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
http://gstore.unm.edu/apps/rgis/datasets/
6ca5428a-a78c-4c82-8120-da70dc92f2cc/
services/ogc/wms?
VERSION=1.1.1&
SERVICE=WMS&
REQUEST=GetMap&
BBOX=-109,31,-102.9,37.1&
LAYERS=tl_2010_35_state10&
WIDTH=200&
HEIGHT=200&
SRS=EPSG:4326&
FORMAT=image/jpeg&
STYLES=
http://gstore.unm.edu/apps/rgis/datasets/
6ca5428a-a78c-4c82-8120-da70dc92f2cc/
services/ogc/wms?
VERSION=1.1.1&
SERVICE=WMS&
REQUEST=GetMap&
BBOX=-109,31,-102.9,37.1&
LAYERS=tl_2010_35_state10&
WIDTH=300&
HEIGHT=300&
SRS=EPSG:4326&
TRANSPARENT=TRUE&
FORMAT=image/png&
STYLES=
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
The documents related to the OGC WFS standard are available from: http://www.opengeospatial.org/standards/wfs and all operation parameter tables presented here are based upon the OpenGIS Web Feature Service 2.0 Interface Standard - Panagiotis (Peter) A. Vretanos, editor - 2010-11-02
From the Version 2.0.0 WFS Scope Section:
This International Standard specifies the behaviour of a service that provides transactions on and access to geographic features in a manner independent of the underlying data store. It specifies discovery operations, query operations, locking operations, transaction operations and operations to manage stored parameterized query expressions.
Discovery operations allow the service to be interrogated to determine its capabilities and to retrieve the application schema that defines the feature types that the service offers.
Query operations allow features or values of feature properties to be retrieved from the underlying data store based upon constraints, defined by the client, on feature properties.
Locking operations allow exclusive access to features for the purpose of modifying or deleting features.
Transaction operations allow features to be created, changed, replaced and deleted from the underlying data store.
Stored query operations allow clients to create, drop, list and described parameterized query expressions that are stored by the server and can be repeatedly invoked using different parameter values.
These request types are submitted as part of the required REQUEST key in a KVP HTTP GET request.
GetCapabilitiesservice metadata (XML) that documents the types of features supported by the service and the operations supported by each feature type
DescribeFeatureTypemetadata (XML) that describes the structure of supported feature types
GetPropertyValuea request for the value(s) of a specified property for a specified featuretype
GetFeature (GetFeatureWithLock)a request for actual features (XML, or other formats) from the service. The request may include both spatial and non-spatial query constraints
LockFeatureFeature locking operation
Transactiona request to a WFS that may create, update, or delete features
CreateStoredQuerya request to create a named WFS query that is stored on the server for future reuse
DropStoredQuerya request to remove a named WFS query that has previously been stored on the server
ListStoredQueriesa request to retrieve a list of named WFS queries that have been stored on the server
DescribeStoredQueriesa request for more detailed information about specific named WFS queries that are stored on the server
WFS 2.0.0 Requests and their corresponding WFS Compliance Levels
Operation (REQUEST=) |
V 1.1.0 | V 2.0.0 | Simple | Basic | Transactional | Locking |
|---|---|---|---|---|---|---|
GetCapabilities |
||||||
DescribeFeatureType |
||||||
ListStoredQueries |
||||||
DescribeStoredQueries |
||||||
GetFeature |
||||||
StoredQuery |
||||||
GetPropertyValue |
||||||
Transaction |
||||||
GetFeatureWithLock |
||||||
LockFeature |
||||||
GetGMLObject |
Requests submitted to a WFS may be submitted either via
a request that includes all request parameters within the URL submitted to the service. Request parameters are included in the URL as “key=value” pairs (KVPs)
a request where the URL consists of only the Host and path, with all other request parameters included in the body of the POST document submitted to the service. The request parameters supplied to the server are encoded as XML within the POST document.
a request submitted as an encapsulated message within a SOAP transaction.
Servers implementing WFS may support either the HTTP GET, POST, or SOAP request model
Conceptually FeatureType = Layer
Base request parameters for all HTTP GET KVP requests
VERSION is required for all operations except the GetCapabilities request
Sample request to USGS Framework Layer (Governmental Units) WFS Service linked from the USGS Framework Web Feature Services web page - Live Link
http://services.nationalmap.gov/arcgis/services/WFS/govunits/MapServer/WFSServer?
request=GetCapabilities&
service=WFS
Sample request to NM RGIS (NM 2010 Census Block Groups) - Live Link
http://gstore.unm.edu/apps/rgis/datasets/715663ba-c1c3-414c-84a7-c671526f8316/services/ogc/wfs?
SERVICE=wfs&
REQUEST=GetCapabilities&
VERSION=1.0.0
DescribeFeatureType HTTP GET KVP request
USGS Framework Layer (Governmental Units) WFS Service linked from the USGS Framework Web Feature Services web page - Live Link
http://services.nationalmap.gov/arcgis/services/WFS/govunits/MapServer/WFSServer?
version=1.1.0&
request=DescribeFeatureType&
service=WFS&
typeName=WFS_govunits:State_or_Territory_High-res
Sample request to NM RGIS (NM 2010 Census Block Groups) - Live Link
http://gstore.unm.edu/apps/rgis/datasets/715663ba-c1c3-414c-84a7-c671526f8316/services/ogc/wfs?
VERSION=1.0.0&
SERVICE=wfs&
REQUEST=DescribeFeatureType&
TYPENAME=tl_2010_35_bg10
GetFeature HTTP GET KVP request
USGS Framework Layer (Governmental Units) WFS Service linked from the USGS Framework Web Feature Services web page - Live Link
Note: TYPENAME for VERSION=1.1.0 instead of TYPENAMES for VERSION=2.0.0
http://services.nationalmap.gov/arcgis/services/WFS/govunits/MapServer/WFSServer?
VERSION=1.1.0&
REQUEST=GetFeature&
SERVICE=WFS&
TYPENAME=WFS_govunits:State_or_Territory_High-res
Alternative request (Live Link) that includes an OUTPUTFORMAT parameter
http://services.nationalmap.gov/arcgis/services/WFS/govunits/MapServer/WFSServer?
VERSION=1.1.0&
REQUEST=GetFeature&
SERVICE=WFS&
TYPENAME=WFS_govunits:State_or_Territory_High-res&
OUTPUTFORMAT=text/xml;%20subType=gml/3.1.1/profiles/gmlsf/1.0.0/0
The documents related to the OGC WCS standard are available from: [http://www.opengeospatial.org/standards/wcs][wcs] with the sample parameters in the following slides based upon the OGC Web Coverage Service 2.0 Interface Standard - KVP Protocol Binding Extension - Peter Baumann, editor - 2010-10-27
From the OGC WCS 2.0 Introduction
The OGC Web Coverage Service (WCS) supports electronic retrieval of geospatial data as "coverages" – that is, digital geospatial information representing space/time-varying phenomena.
This document specifies the WCS core; every implementation of a WCS shall adhere to this standard. This standard thus defines only basic requirements. Extensions to the core will define extensions to meet additional requirements, such as the response encoding. Indeed, additional extensions are required in order to completely specify a WCS for implementation.
A WCS provides access to coverage data in forms that are useful for client-side rendering, as input into scientific models, and for other clients. The WCS may be compared to the OGC Web Feature Service (WFS) and the Web Map Service (WMS). As WMS and WFS service instances, a WCS allows clients to choose portions of a server's information holdings based on spatial constraints and other query criteria.
GetCapabilitiesservice metadata (XML) that documents the service, including brief information about the data coverages available from the service
DescribeCoveragea request for more detailed metadata (XML) for one or more coverages listed in the output of the GetCapabilities request
GetCoveragea request for an actual data product representing a specified coverage. The specific data formats available for delivery will vary from service to service.
Requests submitted to a WCS may be submitted either via the following protocols, as defined in the three extensions developed thus far for the core WCS standard.
a request that includes all request parameters within the URL submitted to the service. Request parameters are included in the URL as “name=value” pairs. Extension Link
a request where the URL consists of only the Host and path, with all other request parameters included in the body of the POST document submitted to the service. The request parameters supplied to the server are encoded as XML within the POST document. Extension Link
a request-response model between the client that conforms with the W3C SOAP web services protocol Extension Link
| Name | Mandatory/Optional | Definition | Data Type |
|---|---|---|---|
| service | M | Identifier of the OGC service | String, fixed to "WCS" |
| request | M | Request type name | String, set to operation name |
| version | M (except for GetCapabilities) | Request protocol version | String |
GetCapabilities requestsNOAA Global Forecast System THREDDS catalog. Live Link
http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201403/20140301/gfs_4_20140301_1200_159.grb2?
service=WCS&
version=1.0.0&
request=GetCapabilities
New Mexico Resource Geographic Information System PRISM Precipitation Normals WCS Service. Live Link
http://gstore.unm.edu/apps/rgis/datasets/2ce10b57-3925-4971-b876-b6fc66d3cca2/services/ogc/wcs?
SERVICE=wcs&
REQUEST=GetCapabilities&
VERSION=1.1.2
DescribeCoverage HTTP GET KVP request
NOAA Global Forecast System THREDDS catalog. Live Link
http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201403/20140301/gfs_4_20140301_1200_159.grb2?
service=WCS&
version=1.0.0&
request=DescribeCoverage&
COVERAGE=Categorical_Rain
New Mexico Resource Geographic Information System PRISM Precipitation Normals WCS Service. Live Link
http://gstore.unm.edu/apps/rgis/datasets/2ce10b57-3925-4971-b876-b6fc66d3cca2/services/ogc/wcs?
SERVICE=wcs&
REQUEST=DescribeCoverage&
VERSION=1.1.2&
COVERAGE=us_ppt_1971_2000_11
GetCoverage HTTP GET KVP request
Subset definition for the GetCoverage HTTP GET KVP request
Example from the 2.0 specification:
http://www.myserver.org:port/path?
service=WCS
&version=2.0
&request=GetCoverage
&coverageId=C0002
&subset=lon,http://www.opengis.net/def/crs/EPSG/0/4326(-71,47)
&subset=lat,http://www.opengis.net/def/crs/EPSG/0/4326(-66,51)
&subset=t,http://www.opengis.net/def/trs/ISO- 8601/0/Gregorian+UTC("2009-11-06T23:20:52Z")
New Mexico Resource Geographic Information System PRISM Precipitation Normals WCS Service. Live Link
http://gstore.unm.edu/apps/rgis/datasets/2ce10b57-3925-4971-b876-b6fc66d3cca2/services/ogc/wcs?
SERVICE=wcs&
REQUEST=GetCoverage&
VERSION=1.1.2&
COVERAGE=us_ppt_1971_2000_11&
CRS=urn:ogc:def:crs:EPSG::4326&
BBOX=24.0625,-125.02083333333,49.93749998965,-66.47916669008&
FORMAT=image/tiff&
WIDTH=2048&
HEIGHT=905
Quantum GIS (QGIS)
ArcGIS
Based upon the results of a GetCapabilities request against a remote service. GetCapabilities request information provided as either:
NASA Earth Observations (NEO) Imagery WMS
http://neowms.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&service=WMS&request=GetCapabilities
USGS Framework Services
http://frameworkwfs.usgs.gov/framework/wms/wms.cgi?SERVICE=wms&REQUEST=GetCapabilities
NASA Earth Observations (NEO) Imagery WMS
http://neowms.sci.gsfc.nasa.gov/wms/wms?
USGS Framework Services
http://frameworkwfs.usgs.gov/framework/wms/wms.cgi?
QGIS uses the Base URL approach for adding WMS, WFS or WCS layers to a project.
The General Process:
You need to know the GetCapabilities request for the service you want to add, for example one of the USGS Framework WMS services
http://frameworkwfs.usgs.gov/framework/wms/wms.cgi?
SERVICE=wms&REQUEST=GetCapabilities
determine the base URL -
http://frameworkwfs.usgs.gov/framework/wms/wms.cgi
in this case
If in doubt, check the information in the metadata
Select the layer type you would like to from "Layer" menu, or click the button in the interface to add a specific layer type.
Add a service to the list of services in the menu (if necessary - QGIS retains information about previously added services) by selecting the "New" option under the service list in the "Add Layer(s) from a Server" dialog
Add the name, base URL and any additional information about the service to the connection dialog box
After adding the service, you can select it from the service list in the "Add Layer(s) from a Server" dialog box, connect to the service to retrieve the GetCapabilities response from the service, select the layers and other options advertised by the service through its response, and add them to your map.
After adding the layer, it appears as an available layer in the table of contents for your map.
WMS, WFS and WCS in QGIS
Based upon the results of a GetCapabilities request against a remote service. GetCapabilities request information provided as either:
This model applies to ArcGIS just as it did for Quantum GIS - the base URL is provided to the various ArcGIS components that support the addition of OGC services to the client interface.
ArcGIS OGC Support Documentation
The addition of OGC WMS and WCS layers to ArcMap is through the same process of
In the context of server platforms for online mapping with OGC services, there are several components that are of interest
Sample Commercial Off-the-Shelf (COTS)
Sample Open Source
GeoServer is an Open Source, Open Standards supporting geospatial web services platform
OS-Independent Binaries are Available for Multiple Platforms (these are just ‘run’ to start the server)
GeoServer may be integrated into existing Java web servlet applications (such as Apache Tomcat) using the available Web Archive (WAR) file.
OS-Specific Installers are also Available
admin:geoserverOptions Common to all WxS services
Options specific to individual services
Styles are XML documents that conform to the OGC SLD standard, and consist of four major components
Defining the placement of labels
Allow for the application different symbolizers to defined sets of features
Allow for the application of different symbolizers at different map scales through the definition of styling rules
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
one or more <NamedLayer> ... </NamedLayer> elements
</StyledLayerDescriptor>
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Simple Point</Name>
<UserStyle>
<Title>SLD Cook Book: Simple Point With Stroke</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
SLD Snippet (Full SLD)
<NamedLayer>
<Name>Simple Point</Name>
<UserStyle>
<Title>SLD Cook Book: Simple Point With Stroke</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
SLD Snippet (Full SLD)
<NamedLayer>
<Name>Simple Line</Name>
<UserStyle>
<Title>SLD Cook Book: Simple Line</Title>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">3</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
SLD Snippet (Full SLD)
<NamedLayer>
<Name>Simple polygon</Name>
<UserStyle>
<Title>SLD Cook Book: Simple polygon</Title>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#000080</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
SLD Snippet (Full SLD)
<NamedLayer>
<Name>Two color gradient</Name>
<UserStyle>
<Title>SLD Cook Book: Two color gradient</Title>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>
<ColorMap>
<ColorMapEntry color="#008000"
quantity="70" />
<ColorMapEntry color="#663333"
quantity="256" />
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<Graphic>
<ExternalGraphic>
<OnlineResource> (Required)
<Format>
<Mark>
<WellKnownName> (Required)
<Fill>
<Stroke>
<Opacity>
<Size>
<Rotation>
<Stroke>
<GraphicFill>
<Graphic> contents same as PointSymbolizer
<GraphicStroke>
<Graphic> contents same as PointSymbolizer
<CssParameter name="...">
name="stroke"
name="stroke-width"
name="stroke-opacity"
name="stroke-linejoin"
name="stroke-linecap"
name="stroke-dasharray"
name="stroke-dashoffset"
<Fill>
<GraphicFill>
<Graphic> contents same as PointSymbolizer
<CssParameter name="...">
name="fill"
name="fill-opacity"
<Stroke> same as the LineSymbolizer
<Opacity>
<ColorMap type="ramp | values | intervals" extended="true | false">
<ColorMapEntry color="" quantity="" label="" opacity=""/>
<ChannelSelection>
<RedChannel> <GreenChannel> <BlueChannel>
<SourceChannelName>
<GrayChannel>
<SourceChannelName>
<ContrastEnhancement>
<ShadedRelief> (not implemented in ver 2.0)
<OverlapBehavior> (not implemented in ver 2.0)
<ImageOutline> (not implemented in ver 2.0)
Filters based upon Attribute Values
<PropertyIsEqualTo>
<PropertyIsNotEqualTo>
<PropertyIsLessThan>
<PropertyIsLessThanOrEqualTo>
<PropertyIsGreaterThan>
<PropertyIsGreaterThanOrEqualTo>
<PropertyIsBetween>
Logical Filters - for combining multiple filters
<And>
<Or>
<Not>
Spatial Filters
<Intersects>
<Equals>
<Disjoint>
<Within>
<Overlaps>
<Crosses>
<DWithin>
<Beyond>
<Distance>
Scale-based selection
<MaxScaleDenominator>
<MinScaleDenominator>
To define an Attribute Filter you need to know both the Attribute Name of the layer(s) that will use the filter and the value(s) of that field that will be used for the filter. How do you determine the attribute name and values?
ogrinfo command from the command line.For example:
ogrinfo -fields=YES -geom=NO kb_gpsrdsdd.shp kb_gpsrdsdd
Where this command requests that the fields and their values be displayed, but that the detailed geometry information (i.e. all of the nodes associated with each feature)
<!-- New Mexico Highways -->
<Rule>
<Title>NM Highways</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>State Highway</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#CCCCCC</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>2</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<!-- US Highways -->
<Rule>
<Title>US Highways</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>US Highway</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#ff0000</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#CCCCCC</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>1</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<!-- Interstate Highways -->
<Rule>
<Title>Interstates</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>Interstate</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#fcff00</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>5</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#222222</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
The only change needed to introduce scale-dependencies into styles is to include <MaxScaleDenominator> or <MinScaleDenominator> elements within a rule where they should be applied. These elements should be placed just before the symbolizer element so that GeoServer can properly validate the provided SLD.
<!-- New Mexico Highways -->
<Rule>
<Title>NM Highways</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>State Highway</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<MaxScaleDenominator>1000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#CCCCCC</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>2</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<!-- US Highways -->
<Rule>
<Title>US Highways</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>US Highway</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#ff0000</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#CCCCCC</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>1</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
This is unchanged from the previous example as the Interstates are visible at all scales.
<!-- Interstate Highways -->
<Rule>
<Title>Interstates</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>Interstate</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#fcff00</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>5</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#222222</ogc:Literal>
</CssParameter>
<CssParameter name="stroke-width">
<ogc:Literal>3</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
Class GeoServer Instance: http://geog485.unm.edu:8080/geoserver/web/
SLD Creation Using QGIS: Link to the QGIS Vector Properties Dialog Documentation.
Review of Raster Styling in GeoServer
Raster Styling Demonstration
<Opacity>
<ColorMap type=ramp|values|intervals extended=true|false>
<ColorMapEntry color="" quantity="" label="" opacity=""/>
<ChannelSelection>
<RedChannel> <GreenChannel> <BlueChannel>
<SourceChannelName>
<GrayChannel>
<SourceChannelName>
<ContrastEnhancement>
<ShadedRelief> (not implemented in ver 2.0)
<OverlapBehavior> (not implemented in ver 2.0)
<ImageOutline> (not implemented in ver 2.0)
<NamedLayer>
<Name>gtopo</Name>
<UserStyle>
<Name>dem</Name>
<Title>Simple DEM style</Title>
<Abstract>Classic elevation color progression</Abstract>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ColorMap>
<ColorMapEntry color="#000000" quantity="-500" label="nodata" opacity="0.0" />
<ColorMapEntry color="#AAFFAA" quantity="0" label="0" />
<ColorMapEntry color="#00FF00" quantity="1000" label="1000"/>
<ColorMapEntry color="#FFFF00" quantity="1200" label="1200" />
<ColorMapEntry color="#FF7F00" quantity="1400" label="1400" />
<ColorMapEntry color="#BF7F3F" quantity="1600" label="1600" />
<ColorMapEntry color="#99CC66" quantity="2000" label="2000" />
<ColorMapEntry color="#336633" quantity="2500" label="2500" />
<ColorMapEntry color="#006600" quantity="3000" label="3000" />
<ColorMapEntry color="#FFFFFF" quantity="3500" label="3500" />
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<ColorMap> or <ColorMap type="ramp">
<ColorMap type="intervals">
<ColorMap type="values">
http://geog485.unm.edu:8080/geoserver/wms?
service=WMS&
version=1.1.0&
request=GetLegendGraphic&
layer=Karl:kb_nm_ned09_30m_nw_qtr2&
style=dem-value&
format=image/png
GeoServer GetLegendGraphic Documentation
<ColorMap type="ramp" extended="false"> = 256 colors in ramp
<ColorMap type="ramp" extended="true"> = 65536 colors in ramp
Options for defining opacity appear in two places in the raster symbolizer.
At the level of the entire raster dataset
<Opacity>0.5</Opacity>
Within a ColorMapEntry for a specific color definition within a ColorMap
<ColorMap>
<ColorMapEntry color="#000000" quantity="-500" label="nodata" opacity="0.0" />
<ColorMapEntry color="#AAFFAA" quantity="0" label="0" />
<ColorMapEntry color="#00FF00" quantity="1000" label="1000"/>
...
<ColorMapEntry color="#FFFFFF" quantity="3500" label="3500" />
</ColorMap>
Many raster datasets contain multiple bands of values which may be viewed individually or assigned to the colors red, green, and blue to generate a color image representing a combination of band values. GeoServer allows for the specification of a single band for display as a GrayChannel or three bands as RedChannel, GreenChannel, and BlueChannel.
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ChannelSelection>
<RedChannel>
<SourceChannelName>3</SourceChannelName>
</RedChannel>
<GreenChannel>
<SourceChannelName>2</SourceChannelName>
</GreenChannel>
<BlueChannel>
<SourceChannelName>1</SourceChannelName>
</BlueChannel>
</ChannelSelection>
</RasterSymbolizer>
Some raster data may need adjustment to increase the contrast (the range between the darkest and lightest values) displayed. GeoServer provides three options for contrast enhancement, each of which have a different effect on the resulting image.
The values are stretched so that an equal number of pixels fall into each color in the range
The minimum and maximum brightness values are mapped to the minimum and maximum raster values
The image is brightened or darkened by a specified factor (negative numbers darken, positive numbers brighten)
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ChannelSelection>
<RedChannel>
<SourceChannelName>1</SourceChannelName>
<ContrastEnhancement>
<Histogram/>
</ContrastEnhancement>
</RedChannel>
<GreenChannel>
<SourceChannelName>2</SourceChannelName>
<ContrastEnhancement>
<Histogram/>
</ContrastEnhancement>
</GreenChannel>
<BlueChannel>
<SourceChannelName>3</SourceChannelName>
<ContrastEnhancement>
<Histogram/>
</ContrastEnhancement>
</BlueChannel>
</ChannelSelection>
</RasterSymbolizer>
<ContrastEnhancement>
<Normalize/>
</ContrastEnhancement>
<ContrastEnhancement>
<Histogram/>
</ContrastEnhancement>
<ContrastEnhancement>
<GammaValue>.5</GammaValue>
</ContrastEnhancement>
Class GeoServer Instance: http://geog485.unm.edu:8080/geoserver/web/
Whew!!! That's a bunch of work for 16 weeks. Good Job.